﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="companyMoneyList.aspx.cs" Inherits="WebSite.crm.company.companyMoneyList" %>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head2" runat="server">
    <title>福利点点通 </title>

  <style>
        a{ color:#FBB065; text-decoration:none;}
  </style>
    <script src="../js/common.js" type="text/javascript"></script> 
    <script  language="javascript" type="text/javascript">
        function popModelWindow(href, type) {
            if (type == 0) {
                X('Window1').box_show(href, '公司出账');
            } else if (type == 1) {
                X('Window1').box_show(href, '公司入账');
            }else if(type == 2) {
                X('Window2').box_show(href, '账务明细');
            }  
        }
    </script>
</head>
<body>
    <form id="form2" runat="server">
       <div class="maincontent">
    
       <ext:PageManager ID="PageManager1" runat="server" />
      <ext:SimpleForm ID="extForm1" runat="server" BodyPadding="5px"   
            EnableBackgroundColor="false" Title="公司应收应付款列表"  ShowHeader="false" >
              <Items>
            <ext:Label ID="lblSpace" runat="server" Text="" Height="20px"></ext:Label>
            <ext:Panel ID="Panel2" ShowHeader="false"  CssClass="x-form-item" ShowBorder="false" Layout="Column" runat="server">
             <Items>  
            <ext:Label ID="lblKeywords"  Width="80px"    runat="server" Text="&nbsp;&nbsp;关键字："></ext:Label>
            <ext:TextBox runat="server" ID="txtKeywords"   MaxLength="100" Label="关键字" ></ext:TextBox>
                   <ext:Button ID="btnSearch" Text="搜索"  CssClass="mleft mright" runat="server" 
                     OnClick="btnSearch_Click"></ext:Button>
                  </Items>
         </ext:Panel>

     </Items>
     
   </ext:SimpleForm>

         <ext:Grid ID="Grid1" Title="查询结果" PageSize="50" ShowBorder="false"  
               CssClass="x-form-item"    AllowPaging="true" 
               SortColumn="CompanyCode" SortDirection="ASC"     
                        OnPageIndexChange="Grid1_PageIndexChange" ShowHeader="true" 
               runat="server" EnableCheckBoxSelect="false"   AllowSorting="true"    IsDatabasePaging="true" 
                        DataKeyNames="CompanyCode,CompanyName" OnSort="Grid1_Sort" 
               EnableRowNumber="True" onrowdatabound="Grid1_RowDataBound">

        <Columns>    
                 <ext:BoundField Width="100px" ColumnID="CompanyCode" SortField="CompanyCode" DataField="CompanyCode" DataFormatString="{0}"
                HeaderText="公司编号" />
      
           <ext:BoundField Width="100px" ColumnID="CompanyShortName" SortField="CompanyShortName" DataField="CompanyShortName" DataFormatString="{0}" HeaderText="公司简称" />
           <ext:BoundField Width="100px" ColumnID="CompanyLevel" SortField="CompanyLevel" DataField="CompanyLevel" DataFormatString="{0}" HeaderText="级别" />
           <ext:BoundField Width="100px" ColumnID="Linker" SortField="Linker" DataField="Linker" DataFormatString="{0}"
                HeaderText="联系人" />
          <ext:BoundField Width="100px" ColumnID="InMoney" SortField="InMoney" DataField="InMoney" DataFormatString="{0}"
                HeaderText="预存款(元)" />
           <ext:BoundField Width="100px" ColumnID="OutMoney" SortField="OutMoney" DataField="OutMoney" DataFormatString="{0}"
                HeaderText="出账(元)" />
           <ext:BoundField Width="100px" ColumnID="RemainingSum" SortField="RemainingSum"  DataField="RemainingSum" DataFormatString="{0}"
                HeaderText="预存余额(元)" />
         <ext:BoundField Width="100px" ColumnID="ReceiveMoney" SortField="ReceiveMoney"  DataField="ReceiveMoney" DataFormatString="{0}"
                HeaderText="应收款(元)" />
          <ext:BoundField Width="100px" ColumnID="CreditMoney" SortField="CreditMoney"  DataField="CreditMoney" DataFormatString="{0}"
                HeaderText="授信额度(元)" />
          <ext:TemplateField Width="120px" SortField="cardcode" HeaderText="操作">
                <ItemTemplate> 
                  <div style="float:left;">
                    <div id="divInMoney" runat="server" style="float:left; display:block;"><a href="#" onclick="popModelWindow('/crm/company/CompanyMoney.aspx?id=<%# Eval("id") %>&type=in',1)",  title="入账">[入账]</a></div> 
                    <div id="divOutMoney" runat="server" style="float:left;  padding-left:5px; display:block;"><a href="#" onclick="popModelWindow('/crm/company/CompanyMoney.aspx?id=<%# Eval("id") %>&type=out',0)",  title="出账">[出账]</a></div>
                    <div id="divDetail" runat="server" style="float:left; padding-left:5px; display:block;">  
                        <a href="#" onclick="popModelWindow('/crm/company/outInMoneyDetail.aspx?id=<%# Eval("id") %>',2)"; title="账务明细-<%# Eval("CompanyShortName")%>">[详细]</a>
                      </div>
                  </div>
                </ItemTemplate>
            </ext:TemplateField>
        </Columns>
    </ext:Grid>


      </div>

          <ext:Window ID="Window1" Title="弹出窗体" Popup="false" EnableIFrame="true" IFrameUrl="about:blank"
        Target="Parent" runat="server"   CloseAction="HidePostBack" IsModal="true" Width="550px"
        EnableConfirmOnClose="true"  OnClose="Window1_Close" Height="270px">
    </ext:Window>


        <ext:Window ID="Window2" Title="弹出窗体" Popup="false" EnableIFrame="true" IFrameUrl="about:blank"
        Target="Parent" runat="server"   CloseAction="HidePostBack" IsModal="true" Width="700px"
        EnableConfirmOnClose="true"  Height="500px">
    </ext:Window>
    </form>
</body>
</html>


